package com.product.home.server;

import com.product.home.server.databaseDAO.DatabaseTable;

public abstract class EmployeeQueries {
	
	public static final String getDesignation="SELECT `DESIGNATION_ID`, `DESIGNATION_NAME`, `DEIGNATION_DESC`, `STATUS` FROM "+DatabaseTable.DESIGNATIONS;
	
	public static final String insertEmployeedata="INSERT INTO "+DatabaseTable.EMPLOYEE_DATA+"(`PERSON_ID`, `SALARY`, `QUALIFICATION`, `EXPERIENCE`, `EMPLOYEE_NO`, `EMPLOYEE_DATE`, `PHOTO`, `DESIGNATION_ID`, `SUBJECT_ID`, `EMPLOYEE_DESC`, `STATUS`,`EMPLOYEE_ID`) VALUES (?,?,?,?,?,?,?,?,?,?,'1',NULL)";
	
	public static final String getEmployeedata="SELECT ED.EMPLOYEE_ID, ED.PERSON_ID, ED.SALARY, ED.QUALIFICATION, ED.EXPERIENCE, ED.EMPLOYEE_NO, ED.EMPLOYEE_DATE, ED.PHOTO, ED.DESIGNATION_ID, ED.SUBJECT_ID, ED.EMPLOYEE_DESC, ED.STATUS,PD.PERSON_ID, PD.FIRST_NAME, PD.MIDDLE_NAME, PD.LAST_NAME, PD.DOB, PD.GENDER, PD.RELIGION, PD.ADDRESS1, PD.ADDRESS2, PD.CITY, PD.STATE, PD.PINCODE, PD.COUNTRY, PD.PHONE1, PD.PHONE2, PD.BLOOD_GROUP, PD.BIRTH_PLACE, PD.NATIONALITY, PD.LANGUAGE, PD.EMAIL,D.DESIGNATION_NAME,COALESCE(SUBJECT_NAME,'0') AS SUBJECT FROM "+DatabaseTable.EMPLOYEE_DATA+" AS ED JOIN "+DatabaseTable.PERSON_DATA+" AS PD JOIN "+DatabaseTable.DESIGNATIONS+" AS D ON ED.PERSON_ID=PD.PERSON_ID AND D.DESIGNATION_ID=ED.DESIGNATION_ID LEFT JOIN "+DatabaseTable.SUBJECTS+" AS S ON S.SUBJECT_ID=ED.SUBJECT_ID WHERE EMPLOYEE_ID=?";

}
